<?php
/**
 * Session 操作类
 * User: Tony Chen
 * Date: 2017/7/23.
 */

class Session
{
    public function __construct()
    {
        session_start();
    }

    public function set($key, $value)
    {
        $_SESSION[$key] = $value;
    }

    public function get($key)
    {
        // $_SEESION['aaa'];
        return $_SESSION[$key];
    }

    public function delete($key)
    {
        unset($_SESSION[$key]);
    }

    public function clear()
    {
        $_SESSION = [];
    }

    public function __destruct()
    {
        // TODO: Implement __destruct() method.
    }

}